﻿function ShopDetails(shopId,pageType) {

    $.post("/Home/GetShopDetails", { 'shopId': shopId, "curType": pageType }, GetShopDetailsResponse);
}

function GetShopDetailsResponse(data) {
    if (data.Success) {
        if (data.Message == null) {
            layer.msg("当前场馆不存在，请稍后再试！");
            return;
        }
        var shop = data.Message;
        var img = '<img src="http://fuwu.xdjsclub.com/Shops/images/' + shop.ImgLogo + '/logo.jpg" alt=""/>'
        $(".frame-logo").html(img);
	$(".frame-club-number").text(shop.TicketName);
        $(".frame-club-name").text(shop.ShopName);
        //$(".frame-tips-text").text(shop.Instructions);
        $(".frame-tips-text").html(shop.Instructions);
        $(".apply-club-text").text(shop.UseShop);
        $("#shopPhone").attr("href", "tel:" + shop.ShopPhone);
        $("#shopPhone").text(shop.ShopPhone);
        $(".volume-frame").show();

    } else {
        layer.msg(data.Message);
    }
}


//选择套餐
function SelectType(id, type) {
    if (type == "1") {
        if (isiOS) {
            $("#" + id).attr("href", "sms:10086&body=XDJSY");
        }
        else {
            $("#" + id).attr("href", "sms:10086?body=XDJSY");
        }
    }
    if (type == "2") {
        if (isiOS) {
            $("#" + id).attr("href", "sms:10086&body=XDJSJ");
        }
        else {
            $("#" + id).attr("href", "sms:10086?body=XDJSJ");
        }
    }
    if (type == "3") {
        if (isiOS) {
            $("#" + id).attr("href", "sms:10086&body=XDJSB");
        }
        else {
            $("#" + id).attr("href", "sms:10086?body=XDJSB");
        }
    }
    if (type == "4") {
        if (isiOS) {
            $("#" + id).attr("href", "sms:10086&body=XDJSN");
        }
        else {
            $("#" + id).attr("href", "sms:10086?body=XDJSN");
        }
    }
}